<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html" xmlns:constants="http://www.tuanzi.com/constants/tags">

    <div class="ui-g">
        <div class="ui-g-12">
            <h3>
                <b>广告位信息</b>
            </h3>
        </div>

        <div class="ui-g-1">
            <p:outputLabel for="platform" value="平台"/>
        </div>
        <div class="ui-g-5">
            <p:selectOneMenu id="platform" value="#{firstPartyTagInfoBean.$.platform}" disabled="#{firstPartyTagInfoBean.isView()}">
                <f:selectItem itemLabel="通用" itemValue="all" noSelectionOption="true"/>
                <f:selectItem itemLabel="安卓" itemValue="android"/>
                <f:selectItem itemLabel="ios" itemValue="ios"/>
            </p:selectOneMenu>
        </div>

        <div class="ui-g-1">
            <p:outputLabel for="redirectType" value="跳转类型"/>
        </div>
        <div class="ui-g-5">
            <p:selectOneButton id="redirectType" disabled="#{firstPartyTagInfoBean.isView()}"
                               value="#{firstPartyTagInfoBean.$.redirectType}">
                <f:selectItem itemLabel="详情页" itemValue="1" noSelectionOption="true"/>
                <f:selectItem itemLabel="合作方H5页" itemValue="4"/>
            </p:selectOneButton>
        </div>

        <div class="ui-g-1">
            <p:outputLabel for="openType" value="打开方式"/>
        </div>
        <div class="ui-g-5">
            <p:selectOneButton id="openType" disabled="#{firstPartyTagInfoBean.isView()}"
                               value="#{firstPartyTagInfoBean.$.openType}">
                <f:selectItem itemLabel="站内跳转" itemValue="0" noSelectionOption="true"/>
                <f:selectItem itemLabel="浏览器打开" itemValue="1"/>
            </p:selectOneButton>
        </div>

        <div class="ui-g-12">
            <h3><b>控量信息</b></h3>
        </div>
        <div class="ui-g-1">
            <p:outputLabel for="listLimit" value="列表"/>
        </div>
        <div class="ui-g-3">
            <div class="input-group">
                <p:inputNumber id="listLimit" value="#{firstPartyTagInfoBean.$.productJoinedLimit.listLimit}"
                               decimalPlaces="0"
                               disabled="#{firstPartyTagInfoBean.isView()}"/>
                <span class="input-group-addon">%</span>
            </div>
        </div>

        <div class="ui-g-1">
            <p:outputLabel for="recommendLimit" value="推荐位"/>
        </div>
        <div class="ui-g-3">
            <div class="input-group">
                <p:inputNumber id="recommendLimit" value="#{firstPartyTagInfoBean.$.productJoinedLimit.recommendLimit}"
                               decimalPlaces="0"
                               disabled="#{firstPartyTagInfoBean.isView()}"/>
                <span class="input-group-addon">%</span>
            </div>
        </div>

        <div class="ui-g-1">
            <p:outputLabel for="topicLimit" value="专题"/>
        </div>
        <div class="ui-g-3">
            <div class="input-group">
                <p:inputNumber id="topicLimit" value="#{firstPartyTagInfoBean.$.productJoinedLimit.topicLimit}"
                               decimalPlaces="0"
                               disabled="#{firstPartyTagInfoBean.isView()}"/>
                <span class="input-group-addon">%</span>
            </div>
        </div>



        <div class="ui-g-1">
            <p:outputLabel for="productId" value="产品"/>
        </div>
        <div class="ui-g-5">
            <p:selectCheckboxMenu id="productId" label="-请选择-" value="#{firstPartyTagInfoBean.$.selectedOnlineProducts}"
                                  disabled="#{firstPartyTagInfoBean.isView()}"
                                  updateLabel="true" multiple="true" filter="true">
                <f:selectItem itemLabel="全产品" itemValue="0"/>
                <f:selectItems
                        value="#{firstPartyTagInfoBean.commProductIds}"
                        var="product"
                        itemLabel="#{product.name}" itemValue="#{product.productId}"/>
            </p:selectCheckboxMenu>
        </div>

        <div class="ui-g-1">
            <p:outputLabel for="excludeChannel" value="剔除渠道"/>
        </div>
        <div class="ui-g-5">
            <p:selectCheckboxMenu id="excludeChannel" label="-请选择-"  value="#{firstPartyTagInfoBean.$.selectedExcludeChannels}"
                                  disabled="#{firstPartyTagInfoBean.isView()}"
                                  updateLabel="true" multiple="true" filter="true">
                <f:selectItems value="#{firstPartyTagInfoBean.commProductChannels}" var="channel"
                               itemValue="#{channel.channelCode}" itemLabel="#{channel.channelName}"/>
            </p:selectCheckboxMenu>
        </div>

    </div>
</ui:composition>